home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 574 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: hades.rz.uni-sb.de!news
  2. From: rajsta@med-rz.uni-sb.de (Johannes Stahl)
  3. Newsgroups: comp.graphics.algorithms,comp.lang.c++,comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32
  4. Subject: Re: IJG JPEG Engine and Win32
  5. Date: Fri, 05 Jan 1996 07:37:37 GMT
  6. Organization: University of Saarland, Computing Center, Germany.
  7. Message-ID: <4cij50$35l@hades.rz.uni-sb.de>
  8. References: <4cemir$6vb@redstone.interpath.net>
  9. NNTP-Posting-Host: ukdra02.med-ra.uni-sb.de
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. fortunat@interpath.com (Jumpstile Turner) wrote:
  13.  
  14. >  Hi all.  Has anyone successfully compiled and linked the IJG JPEG engine 
  15. >with a Win32 compiler?  I can compile it fine and the resulting LIB file works 
  16. >great when linking it into the included test applications; however, if I try 
  17. >to link it with my GUI apps I get some really odd errors.   It links fine but 
  18. >doesn't work! I'm using Borland C++ 4.52 (maybe this is my problem. (-: )    
  19. >Basically stepping through with the debugger there is an assignment statement 
  20. >in one of the modules that just doesn't do anything.  I mean nothing.  If I do 
  21. >the assignment by hand with the debugger it works.  For example, the 
  22. >assignment is as follows:
  23.  
  24. > cinfo->output_width = cinfo->image_width;
  25.  
  26. >cinfo->output_width is 0 and cinfo->image_width is say 289.  After the above 
  27. >assignment nothing changes.   I'm far from a c++ expert and I've never 
  28. >encountered something like this before.  If someone has compiled this lib 
  29. >under Win32 I'd appreciate it if they could mail it my way.  I'd like to see 
  30. >if its my compiler settings or just my ignorance. ;)   The big problem I can't 
  31. >figure is that the compiled lib works fine linked with the test programs.  I 
  32. >tried copying the code from the examples line for line but it just won't work 
  33. >under the GUI.
  34.  
  35. I had the same problem. It turned out that the data alignment settings
  36. were different for the library and the application, which means that
  37. the application and the library expect the data items in a struct to
  38. be at different adresses. This is why your debugger doesn't see any
  39. change in the variables. You should also take care for redefinitions
  40. of boolean, which is declared to be a (32 bit) int in the jpeg
  41. headers, but to be a (8 bit) character in Microsofts rpc.h.
  42.  
  43.  
  44. --
  45. Dr. Johannes Stahl   Abt. Radiodiagnostik
  46. Radiologische Klinik, D66421 Homburg/Saar (GERMANY)
  47. Tel.: +49 6841 164600  Fax: +49 6841 164696
  48. e-mail: rajsta@med-rz.uni-sb.de
  49. http://www.med-rz.uni-sb.de/med_fak/radiodiagnostik/index.html
  50.  
  51.